package com.rybbaby.tss.front.tssCourse.entity;

import com.rybbaby.tss.platform.sysAdminUser.entity.SysAdminUser;
import com.rybbaby.tss.platform.sysCourseSystem.entity.SysCourseSystem;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @description 课程表
 * 
 * @author 雷春琼
 * 
 * @createDate 2017-08-10 下午7:57:36
 */
@Entity
@Table(name = "tss_course")
@DynamicUpdate(true)
@DynamicInsert(true)
public class TssCourse implements Serializable {
	
	private static final long serialVersionUID = 125610407228980L;
	
	/** 主键 **/
	private String id;
	/** 课程体系Id **/
	private String systemId;
	/** 课程体系父Id **/
	private String systemPid;
	/** 操作人 **/
	private String adminUserId;
	/** 课程类型 **/
	private Integer type;
	/** 状态 **/
	private Integer status;
	/** 创建时间 **/
	private java.sql.Timestamp createTime;
	/** 修改时间 **/
	private java.sql.Timestamp updateTime;
	/** 版本 **/
	private Integer version;
	/** 课程体系 **/
	private SysCourseSystem idEntity;

	/** 课程体系 **/
	private SysCourseSystem pidEntity;

	/** 用户信息表 **/
	private SysAdminUser sysAdminUser;

	/**
	 * 是否停用
	 */
	private Boolean isBlockUp;
	
	/**
	 * 方法: 取得主键
	 *
	 * @return SysCourseSystem 主键
	 */
	@JoinColumn(name = "systemId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysCourseSystem.class)
	public SysCourseSystem getIdEntity() {
		return this.idEntity;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param idEntity 主键
	 */
	public void setIdEntity(SysCourseSystem idEntity) {
		this.idEntity = idEntity;
	}

	@JoinColumn(name = "systemPid" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysCourseSystem.class)
	public SysCourseSystem getPidEntity() {
		return pidEntity;
	}

	public void setPidEntity(SysCourseSystem pidEntity) {
		this.pidEntity = pidEntity;
	}

	@JoinColumn(name = "adminUserId" , insertable = false , updatable = false)
	@ManyToOne(fetch = FetchType.LAZY , targetEntity = SysAdminUser.class)
	public SysAdminUser getSysAdminUser() {
		return sysAdminUser;
	}

	public void setSysAdminUser(SysAdminUser sysAdminUser) {
		this.sysAdminUser = sysAdminUser;
	}

	/**
	 * 方法: 取得主键
	 *
	 * @return java.lang.Integer 主键
	 */
	@Id
	@GeneratedValue(generator = "tss_courseIDGenerator" , strategy = GenerationType.AUTO)
	@GenericGenerator(name = "tss_courseIDGenerator" , strategy = "uuid")
	@Column(name = "id", nullable= false, length = 32)
	public String getId() {
		return this.id;
	}
	
	/**
	 * 方法: 设置主键
	 *
	 * @param id 主键
	 */
	public void setId(String id) {
		this.id = id;
	}
	
	/**
	 * 方法: 取得课程体系Id
	 *
	 * @return java.lang.Integer 课程体系Id
	 */
	@Column(name = "systemId", nullable= true, length = 32)
	public String getSystemId() {
		return this.systemId;
	}
	
	/**
	 * 方法: 设置课程体系Id
	 *
	 * @param systemId 课程体系Id
	 */
	public void setSystemId(String systemId) {
		this.systemId = systemId;
	}

	
	/**
	 * 方法: 取得
	 *
	 * @return java.lang.Integer 
	 */
	@Column(name = "adminUserId", nullable= true, length = 32)
	public String getAdminUserId() {
		return this.adminUserId;
	}
	
	/**
	 * 方法: 设置
	 *
	 * @param adminUserId
	 */
	public void setAdminUserId(String adminUserId) {
		this.adminUserId = adminUserId;
	}
	
	/**
	 * 方法: 取得课程类型
	 *
	 * @return java.lang.Integer 课程类型
	 */
	@Column(name = "type", nullable= true, length = 11)
	public Integer getType() {
		return this.type;
	}
	
	/**
	 * 方法: 设置课程类型
	 *
	 * @param type 课程类型
	 */
	public void setType(Integer type) {
		this.type = type;
	}
	
	/**
	 * 方法: 取得状态
	 *
	 * @return java.lang.Integer 状态
	 */
	@Column(name = "status", nullable= true, length = 11)
	public Integer getStatus() {
		return this.status;
	}
	
	/**
	 * 方法: 设置状态
	 *
	 * @param status 状态
	 */
	public void setStatus(Integer status) {
		this.status = status;
	}
	

	/**
	 * 方法: 取得创建时间
	 *
	 * @return java.sql.Timestamp 创建时间
	 */
	@Column(name = "createTime", nullable= true, length = 19)
	public java.sql.Timestamp getCreateTime() {
		return this.createTime;
	}
	
	/**
	 * 方法: 设置创建时间
	 *
	 * @param createTime 创建时间
	 */
	public void setCreateTime(java.sql.Timestamp createTime) {
		this.createTime = createTime;
	}
	
	/**
	 * 方法: 取得修改时间
	 *
	 * @return java.sql.Timestamp 修改时间
	 */
	@Column(name = "updateTime", nullable= true, length = 19)
	public java.sql.Timestamp getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * 方法: 设置修改时间
	 *
	 * @param updateTime 修改时间
	 */
	public void setUpdateTime(java.sql.Timestamp updateTime) {
		this.updateTime = updateTime;
	}
	
	/**
	 * 方法: 取得版本
	 *
	 * @return java.lang.Integer 版本
	 */
    @Version
	@Column(name = "version", nullable= true, length = 11)
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * 方法: 设置版本
	 *
	 * @param version 版本
	 */
	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "isBlockUp", nullable= true, length = 1)
	public Boolean getIsBlockUp() {
		return this.isBlockUp;
	}

	public void setIsBlockUp(Boolean isBlockUp) {
		this.isBlockUp = isBlockUp;
	}

	@Column(name = "systemPid", nullable= true, length = 32)
	public String getsystemPid() {
		return systemPid;
	}

	public void setsystemPid(String systemPid) {
		this.systemPid = systemPid;
	}
}